'''
Created on Feb 1, 2012

@author: xzhu
'''
from CONF import CONF
import const

class RES():
    '''
    MCCE residue type
    '''


    def __init__(self):
        '''
        Constructor
        '''
        self.conformers = []
        self.resID      = ''
        
    def init_from_conf(self, conformer):
        '''
        initialize residue from the first confomrer of this residue
        '''
        
        self.conformers.append(conformer)
        self.resID = conformer.resID
        
    def conf_is_in(self, conformer):
        return self.resID == conformer.resID
    
    def poss_ioni_state(self):
        return const.POSS_IONI[self.resID[:3]]